#include <bits/stdc++.h>
using namespace std;
int n;
double ans = 0;

int main() {
    cin >> n;
    int f = -1;
    for (int i = 1; i <= n; i++) {
        f = f * -1;
        ans += (double)1 * f / i;
    }

    cout << fixed << setprecision(4) << ans;
    return 0;
}